Type Alias: QueryOptions<TData>
QueryOptions<
TData
>:Omit
<UseQueryOptions
<TData
>,"queryKey"
|"queryFn"
>
See Tanstack Query - useQuery options.
Type Parameters
• TData = unknown
The data returned.
See
Tanstack Query - useQuery
Options
queryKey
andqueryFn
are used internally and therefore not included in the options.
query: {
- queryKey,
- queryFn,
gcTime,
enabled,
networkMode,
initialData,
initialDataUpdatedAt,
meta,
notifyOnChangeProps,
placeholderData,
queryKeyHashFn,
refetchInterval,
refetchIntervalInBackground,
refetchOnMount,
refetchOnReconnect,
refetchOnWindowFocus,
retry,
retryOnMount,
retryDelay,
select,
staleTime,
structuralSharing,
throwOnError
}
Example
useQueryHook({
query: {
enabled: isReady,
staleTime: 1000,
placeHolderData: { foo: 'bar' },
}
})